#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
int main()
{
	char str1[1001], str2[1001];
	int a[1001] = { 0 }, b[1001] = { 0 }, c[1001] = { 0 }, k = 0, j;
	gets(str1);
	gets(str2);
	int len1 = strlen(str1);
	int len2 = strlen(str2);

	for (int i = 0; i < len1; i++)
		a[i] = str1[len1 - i - 1] - '0';

	for (int i = 0; i < len2; i++)
		b[i] = str2[len2 - i - 1] - '0';

	int len = len1 > len2 ? len1 : len2;
	for (int i = 0; i <= len; i++)
	{
		c[i] = a[i] + b[i] + k;
		k = c[i] / 10;
		c[i] = c[i] % 10;
	}

	for (j = 1000; j >= 0; j--)
		if (c[j] != 0)
			break;

	for (; j >= 0; j--)
		printf("%d", c[j]);
	return 0;
}